<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>{:isset($info['id'])?'编辑':'新增'}后台菜单</h2>
    </div>
    <div class="panel-body panel panel-default">
        <form action="{:U()}" method="post">
            <div class="form-group">
                <label class="control-label">标题<span class="check-tips">（用于后台显示的配置标题）</span></label>
                <input type="text" class="form-control" name="title" value="{$info.title|default=''}">
            </div>
            <div class="form-group">
                <label class="control-label">排序<span class="check-tips">（用于分组显示的顺序）</span></label>
                <input type="text" class="form-control input-s-sm" name="sort" value="{$info.sort|default=0}">
            </div>
            <div class="form-group">
                <label class="control-label">链接<span class="check-tips">（U函数解析的URL或者外链）</span></label>
                <input type="text" class="form-control" name="url" value="{$info.url|default=''}">
            </div>
            <div class="form-group">
                <label class="control-label">上级菜单<span class="check-tips">（所属的上级菜单）</span></label>
                <select name="pid" class="form-control input-s-sm">
                    <volist name="Menus" id="menu">
                        <option value="{$menu.id}"<php>echo $info['pid']==$key?' selected="selected"':''</php>>{$menu.title_show}</option>
                    </volist>
                </select>
            </div>
            <div class="form-group">
                <label class="control-label">分组<span class="check-tips">（用于左侧分组二级菜单）</span></label>
                <input type="text" class="form-control" name="group" value="{$info.group|default=''}">
            </div>
            <div class="form-group">
                <label class="control-label">是否隐藏<span class="check-tips"></span></label>
                <label class="checkbox-inline"><input type="radio" name="hide" value="1"<php>echo $info['hide']==1?' checked="checked"':''</php>>是</label>
                <label class="checkbox-inline"><input type="radio" name="hide" value="0"<php>echo $info['hide']==0?' checked="checked"':''</php>>否</label>
            </div>
            <div class="form-group">
                <label class="control-label">仅开发者模式可见<span class="check-tips"></span></label>
                <label class="checkbox-inline"><input type="radio" name="is_dev" value="1"<php>echo $info['is_dev']==1?' checked="checked"':''</php>>是</label>
                <label class="checkbox-inline"><input type="radio" name="is_dev" value="0"<php>echo $info['is_dev']==0?' checked="checked"':''</php>>否</label>
            </div>
            <div class="form-group">
                <label class="control-label">说明<span class="check-tips">（菜单详细说明）</span></label>
                <input type="text" class="form-control" name="tip" value="{$info.tip|default=''}">
            </div>
            <div class="form-group">
                <input type="hidden" name="id" value="{$info.id|default=''}">
                <button class="btn btn-primary submit-btn ladda-button" data-style="slide-up" type="submit">确 定</button>
                <button class="btn btn-default" onclick="javascript:history.back(-1);
                        return false;">返 回</button>
            </div>
        </form>
    </div>
</block>